<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="connections/connect.asp" -->
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Shoes Shop</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="">
		<!--[if ie]><meta content='IE=8' http-equiv='X-UA-Compatible'/><![endif]-->
		<!-- bootstrap -->
		<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">      
		<link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">		
		<link href="themes/css/bootstrappage.css" rel="stylesheet"/>
		
		<!-- global styles -->
		<link href="themes/css/flexslider.css" rel="stylesheet"/>
		<link href="themes/css/main.css" rel="stylesheet"/>

		<!-- scripts -->
		<script src="themes/js/jquery-1.7.2.min.js"></script>
		<script src="bootstrap/js/bootstrap.min.js"></script>				
		<script src="themes/js/superfish.js"></script>	
		<script src="themes/js/jquery.scrolltotop.js"></script>
		<!--[if lt IE 9]>			
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
			<script src="js/respond.min.js"></script>
		<![endif]-->
	</head>
    <body>		
		<div id="top-bar" class="container">
			<div class="row">
				<div class="span4">
					<form method="POST" class="search_form">
						<input type="text" class="input-block-level search-query" Placeholder="eg. T-sirt">
					</form>
				</div>
				<div class="span8">
					<div class="account pull-right">
						<ul class="user-menu">				
							<%
				var user =Session("user")
				if (user == null)
				{
				%>			
                			<li><a href="register.asp">Register</a></li>	
                			<li><a href="login.asp">Login</a></li>	
								
                            <%
				}
				else
				{					
					var sql1="select * from Customer where CustomerID='"+user+"'"
					var getid=conn.Execute(sql1)
							
							%>											
							<li><a href="user_profile.asp?CustomerID=<%=getid('CustomerID')%>">Profile's <%=getid('CustomerID')%></a></li>
                            <li><a href="history.asp">Your Order</a></li>
                            <li><a href="message.asp">Message</a></li>
                            <li><a href="logout.asp">Logout</a></li>
                            <%
				}
							%>			
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div id="wrapper" class="container">
			<section class="navbar main-menu">
				<div class="navbar-inner main-menu">				
					<a href="index.asp" class="logo pull-left"><img src="themes/images/logo.png" class="site_logo" alt=""></a>
					<nav id="menu" class="pull-right">
						<ul>
							<%
						var sql ="select * from Category"
						var cat=conn.Execute(sql)
						while(!cat.EOF)
						{
					%>
						<li>  <a href="products.asp?categoryid=<%=cat("CategoryID")%>"> <%=cat("CategoryName")%> </a> </li>
					<%
						cat.Movenext()
						}
					%>         
							<li><a href="topseller.asp">Top Seller</a></li>
						</ul>
					</nav>
				</div>
			</section>	
			<section class="header_text sub">
			<img class="pageBanner" src="themes/images/pageBanner.png" alt="New products" >
				<h4><span>New products</span></h4>
			</section>
			<section class="main-content">
				
				<div class="row">						
					<div class="span12">	
                     <ul class="thumbnails listing-products">
                     <%										 		
					 				
								var sql= "Select Top 4 p.ProductName,p.ProductID,p.Image,p.Price,p.CategoryID from Product p, OrderDetail o Where p.ProductID=o.ProductID Group by p.ProductID,p.CategoryID,p.ProductName,p.Image,p.Price Order By SUM(o.Quantity) DESC"																																																						
								var list=conn.Execute(sql)																										
                        while (!list.EOF)
											{	
											%>                          
							<li class="span3">
								<div class="product-box">
									<span class="sale_tag"></span>												
									<a href="product_detail.asp?prodID=<%=list("ProductID")%>"><img alt="" src="Upload/ImageProd/<%=list("Image")%>"></a><br/>
									<a href="product_detail.asp?prodID=<%=list("ProductID")%>" class="title"><%=list("ProductName")%></a><br/>                                    
									<p class="price">$<%=list("Price")%></p>
								</div>
							</li>  
                            <%
							list.MoveNext()
							}
						%>                                                                                       							
						</ul>	                          							
						<hr>
						<div class="pagination pagination-small pagination-centered">
							<ul>
								<li><a href="#">Prev</a></li>
								<li class="active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">Next</a></li>
							</ul>
						</div>
					</div>
				</div>
			</section>
			<section id="footer-bar">
				<div class="row">
					<div class="span3">
						<h4>Navigation</h4>
						<ul class="nav">
							<li><a href="./index.asp">Homepage</a></li>  
							<li><a href="./about.asp">About Us</a></li>
							<li><a href="./contact.asp">Contac Us</a></li>													
						</ul>					
					</div>					
					<div class="span5">
						<p class="logo"><img src="themes/images/logo.png" class="site_logo" alt=""></p>
						<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. the  Lorem Ipsum has been the industry's standard dummy text ever since the you.</p>
						<br/>
						<span class="social_icons">
							<a class="facebook" href="#">Facebook</a>
							<a class="twitter" href="#">Twitter</a>
							<a class="skype" href="#">Skype</a>
							<a class="vimeo" href="#">Vimeo</a>
						</span>
					</div>					
				</div>	
			</section>
			<section id="copyright">
				<span>Copyright 2014 Shoes Shop  All right reserved.</span>
			</section>
		</div>
		<script src="themes/js/common.js"></script>	
    </body>
</html>